fn hello() {
//...
}
fn printNums(num: i32) {
for i in 0..num {
println!("Number {}", i + 1);
}
}
1
fn sale_price(price: i32) -> i32 {
if is_even(price) {
price - 10
} else {
price - 3
}
}
2
fn is_even(num: i32) -> bool {
num % 2 == 0
}
;
이 붙으면 statement